#include("../_common/form_input.html")
#@admin_header()
<!-- 内容主体区域 -->
<div class="layui-body">
  <div style="padding: 15px;">
    <form class="layui-form layui-form-pane">
      #@form_input("user_name", "站长姓名", dp.getUserName(), "请输入站长姓名", "")
      #@form_input("user_motto", "站长座右铭", dp.getUserMotto(), "请输入站长座右铭", "")
      #@form_input("user_contact", "站长Email", dp.getUserContact(), "请输入站长联系方式", "")
      <div class="layui-form-item">
        <div class="layui-input-block">
          <button class="layui-btn" lay-filter="infoConfig" lay-submit="">立即提交</button>
          <button class="layui-btn layui-btn-primary" type="reset">重置</button>
        </div>
      </div>
    </form>
  </div>
</div>
<script>
  //JavaScript代码区域
  layui.use(['form'], function () {
    var form = layui.form;
    form.render();
    // 提交
    form.on('submit(infoConfig)', function (data) {
      ToastLoading('正在保存...');
      $.post("#(adminRoot)/setting/info/save", data.field)
        .success(function (ret) {
          ToastShow(ret.code, ret.msg, ret.url);
        })
        .error(function () {
          ToastErr('网络错误');
        })
      return false;
    });
  });
</script>
#@admin_footer()
